<?php
class usergrade_model extends CI_Model{
	private $gradeid;
	private $description;
	private $createdby;
	private $createdon;
	private $lastupdateby;
	private $lastupdateon;
	private $active;

	function setGradeID($gID){
		$this->gradeid = $gID;
	}

	function getGradeID(){
		return $this->gradeid;
	}

	function setDescription($desc){
		$this->description = $desc;
	}

	function getDescription(){
		return $this->description;
	}

	function setCreatedBy($c_by){
		$this->createdby = $c_by;
	}

	function getCreatedBy(){
		return $this->createdby;
	}

	function setCreatedOn(){
		$dateNow = date('Y-m-d H:i:s');
		$this->createdon = $dateNow;
	}

	function getCreatedOn(){
		return $this->createdon;
	}

	function setLastUpdateBy($u_by){
		$this->lastupdateby = $u_by;
	}

	function getLastUpdateBy(){
		return $this->lastupdateby;
	}

	function setLastUpdateOn(){
		$dateNow = date('Y-m-d H:i:s');
		$this->lastupdateon = $dateNow;
	}

	function getLastUpdateOn(){
		return $this->lastupdateon;
	}

	function setActive($active_val){
		$this->active = $active_val;
	}

	function getActive(){
		return $this->active;
	}

	function __construct(){
		parent::__construct();
	}
	
	function getGradeList(){
		$this->db->select('gradeid,description')->where(array('active' => '1'));
		$query = $this->db->get('usergrade');
		return $query->result();
	}
}